
package com.sunsys.cxf.java_first_jaxws_client;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPBinding;

import com.sunsys.examples.cxf.server.HelloWorld;
import com.sunsys.examples.cxf.server.User;
import com.sunsys.examples.cxf.server.UserImpl;

public class Cient {

    private static final QName SERVICE_NAME 
    = new QName("http://server.cxf.examples.sunsys.com/", "HelloWorld");
    private static final QName PORT_NAME 
    = new QName("http://server.cxf.examples.sunsys.com/", "HelloWorldPort");

    public static void main(String args[]) throws Exception {

//        Service service = Service.create(SERVICE_NAME);
//        String endpointAddress = "http://localhost:8080/java_first_jaxws_Server/services/hello_world";
//
//        service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
//        
//        HelloWorld hw = service.getPort(HelloWorld.class);
//        System.out.println(hw.sayHi("World"));
//
//        User user = new UserImpl("World");
//        System.out.println(hw.sayHiToUser(user));
//
//        //say hi to some more users to fill up the map a bit
//        user = new UserImpl("Galaxy");
//        System.out.println(hw.sayHiToUser(user));

    	
    	
    	/*
    	 * 
    	 * 		THIS CLIENT PROGRM DID"T WORK
    	 * 
    	 * 
    	 */

    }
}
